package main

import (
	"fmt"
	"math"
)

func main() {
	var a int = 10
	fmt.Print(a)
	fmt.Printf("%d \n", a) // 10
	fmt.Printf("%b \n", a) // 1010  占位符%b表示二进制

	fmt.Printf("%f\n", math.Pi)
	fmt.Printf("%.2f\n", math.Pi)

	var c1 complex64
	c1 = 1 + 2i
	var c2 complex128
	c2 = 2 + 3i
	fmt.Println(c1)
	fmt.Println(c2)

	s1 := "222"
	print(s1)

	fmt.Println("str := \"c:\\Code\\lesson1\\go.exe\"")

	s2 := "hello沙河小王子"

	count := 0
	for _, i := range s2 {
		//fmt.Printf("%c\n",i)
		length := len(string(i)) //获取每个字符串的长度
		if length >= 3 {         //判断字符长度
			count++
		}
	}
	print(count)

}
